﻿@inherits BaseComponent

<CmsCard>
    @if (CurrentUser == null)
    {
        <AntButton Name="登录 | 注册" Block OnClick="AntBlazor.showModal('modal-login')" />
    }
    else
    {
        <div class="cl-sign-box">
            <div class="user">
                <a href="@Url.UserCreatorUrl">
                    <AntAvatar Src="@CurrentUser?.AvatarUrl" />
                    <span>@CurrentUser?.Name</span>
                </a>
            </div>
            <div>
                <AntButton Name="去提问" OnClick="@($"location='{Url.BbsPostFormUrl}'")" />
            </div>
        </div>
    }
</CmsCard>
@if (CurrentUser == null)
{
    <LoginForm Id="modal-login" />
}